/**
 * 各个国际区号的正则表达式
 */
const areaCodeReg = {
    '86': /^1[3-9]\d{9}$/,
    '852': /^6\d{7}$/,
    '853': /^6\d{7}$/,
    '886': /^9\d{8}$/,
    '1': /^1[3-9]\d{9}$/,
    '44': /^7\d{9}$/,
    '61': /^4\d{8,9}$/,
    '64': /^2\d{7,9}$/,
    '65': /^8\d{7}$/,
    '81': /^0\d{9,10}$/,
    '82': /^01\d{8,9}$/,
    '66': /^0\d{9}$/,
    '84': /^0\d{9}$/,
    '62': /^0\d{9,11}$/,
    '60': /^1\d{8,9}$/,
    '63': /^9\d{9}$/,
    '91': /^6\d{9}$/,
    '92': /^3\d{9}$/,
    '93': /^7\d{8}$/,
    '94': /^7\d{8}$/,
}

let check = (areaCode,phone) => {
    if (areaCodeReg[areaCode]) {
        return areaCodeReg[areaCode].test(phone);
    }
    return false;
}

export default {
    check
};